﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System
{
    public static class GenericExtension
    {
        public static T IfThen<T>(this T obj, Func<T, bool> pred, Func<T> then)
        {
			return pred(obj) ? then() : obj;
        }
    }
}
